home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / X11 / config / Library.tmpl < prev    next >
Encoding:
Text File  |  2006-12-20  |  18.0 KB  |  597 lines

  1. /*
  2.  * Library imakefile info  - this contains any special redefinitions, etc.
  3.  * that Imakefiles in the various library subtrees will need.
  4.  *
  5.  * Before including this, you must set the following boolean variables:
  6.  * DoNormalLib, DoSharedLib, DoDebugLib, DoProfileLib
  7.  *
  8.  * To get automatic generation of standard rules, also set the variables:
  9.  * LibName, SoRev, HasSharedData, and optionally HugeLibrary and IncSubdir.
  10.  *
  11.  * To suppress installation of the library define LibInstall NO.
  12.  * To suppress creating (and installing) the library define LibCreate NO.
  13.  * To suppress installing headers define LibHeaders NO.
  14.  * Define LargePICTable YES if large (32-bit) PIC tables are needed.
  15.  */
  16.  
  17. XCOMM $Xorg: Library.tmpl,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
  18.  
  19.  
  20.  
  21.  
  22. XCOMM $XFree86: xc/config/cf/Library.tmpl,v 3.23tsi Exp $
  23.  
  24. #ifndef DoNormalLib
  25. #define DoNormalLib NO
  26. #endif
  27. #ifndef DoSharedLib
  28. #define DoSharedLib NO
  29. #endif
  30. #ifndef DoDebugLib
  31. #define DoDebugLib NO
  32. #endif
  33. #ifndef DoProfileLib
  34. #define DoProfileLib NO
  35. #endif
  36. #ifndef DoExtraLib
  37. #define DoExtraLib NO
  38. #endif
  39.  
  40. #ifndef DoPicLib
  41. # if DoNormalLib && !DoSharedLib && !StaticNeedsPicForShared
  42. #  define DoPicLib YES
  43. # else
  44. #  define DoPicLib NO
  45. # endif
  46. #endif
  47.  
  48. #ifndef HasSharedData
  49. #define HasSharedData NO
  50. #endif
  51. #ifndef HugeLibrary
  52. #define HugeLibrary NO
  53. #endif
  54.  
  55. #ifndef ShlibBindGlobals
  56. #define ShlibBindGlobals NO
  57. #endif
  58.  
  59. #if ShlibBindGlobals && defined(ShlibGlobalsFlags)
  60. SHLIBGLOBALSFLAGS = ShlibGlobalsFlags
  61. #endif
  62.  
  63. #ifndef LibraryCplusplusOptions
  64. # if (DoSharedLib || DoPicLib) && defined(SharedLibraryCplusplusOptions)
  65. #  define LibraryCplusplusOptions SharedLibraryCplusplusOptions
  66. # else
  67. #  define LibraryCplusplusOptions DefaultCplusplusOptions
  68. # endif
  69. #endif
  70. #ifndef LibraryDefines
  71. # define LibraryDefines StandardDefines
  72. #endif
  73. #ifndef LibraryDebugOpt
  74. # define LibraryDebugOpt /**/
  75. #endif
  76. /* Note: Changing LibraryCDebugFlags has no effect because CDEBUGFLAGS is over-
  77.    ridden by PassCDebugFlags in the parent Makefile or toplevel xmakefile. */
  78. #ifndef LibraryCDebugFlags
  79. # define LibraryCDebugFlags DefaultCDebugFlags
  80. #endif
  81. #ifndef LibraryCplusplusDebugFlags
  82. # define LibraryCplusplusDebugFlags DefaultCplusplusDebugFlags
  83. #endif
  84. #ifndef SeparateSharedCompile
  85. # define SeparateSharedCompile YES
  86. #endif
  87.  
  88. #ifdef CrossCompileDir
  89. # ifndef StripPath
  90. #  define StripPath(x) `echo x|sed "s%.*/%%"`
  91. # endif
  92. #endif
  93.  
  94. #ifndef CplusplusSource
  95. # ifndef LibraryCcCmd
  96. #  if (DoSharedLib || DoPicLib) && defined(SharedLibraryCcCmd)
  97. #   define LibraryCcCmd SharedLibraryCcCmd
  98. #  else
  99. #   define LibraryCcCmd CcCmd
  100. #  endif
  101. # endif
  102. # ifndef LibraryCCOptions
  103. #  if (DoSharedLib || DoPicLib) && defined(SharedLibraryCCOptions)
  104. #   define LibraryCCOptions SharedLibraryCCOptions
  105. #  else
  106. #   define LibraryCCOptions DefaultCCOptions
  107. #  endif
  108. # endif
  109.  
  110. #ifdef CrossCompileDir
  111. # ifndef CrossLibraryCcCmd
  112. #  define CrossLibraryCcCmd Concat3(CrossCompileDir,/,StripPath(LibraryCcCmd))
  113. # endif
  114. #endif
  115.  
  116. #ifdef CrossCompileDir
  117.          CC = CrossLibraryCcCmd
  118. #else
  119.          CC = LibraryCcCmd
  120. #endif
  121.   CCOPTIONS = LibraryCCOptions
  122. STD_DEFINES = LibraryDefines $(PROJECT_DEFINES)
  123. CDEBUGFLAGS = LibraryCDebugFlags
  124. CLIBDEBUGFLAGS = LibraryDebugOpt
  125.      CFLAGS = $(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
  126. # if defined(LargePICTable) && LargePICTable && defined(LargePositionIndependentCFlags)
  127.    PICFLAGS = LargePositionIndependentCFlags
  128. # endif
  129. #else
  130. # ifndef CrossCompileDir
  131. #  ifndef LibraryCplusplusCmd
  132. #   if (DoSharedLib || DoPicLib) && defined(SharedLibraryCplusplusCmd)
  133. #    define LibraryCplusplusCmd SharedLibraryCplusplusCmd
  134. #   else
  135. #    define LibraryCplusplusCmd CplusplusCmd
  136. #   endif
  137. #  endif
  138. # else
  139. #  ifndef CrossLibraryCplusplusCmd
  140. #   if (DoSharedLib || DoPicLib) && defined(SharedLibraryCplusplusCmd)
  141. #    define CrossLibraryCplusplusCmd Concat3(CrossCompileDir,/,StripPath(SharedLibraryCplusplusCmd))
  142. #   else
  143. #    define CrossLibraryCplusplusCmd Concat3(CrossCompileDir,/,StripPath(CplusplusCmd))
  144. #   endif
  145. #  endif
  146. # endif
  147.  
  148. # ifndef LibraryCplusplusOptions
  149. #  if (DoSharedLib || DoPicLib) && defined(SharedLibraryCplusplusOptions)
  150. #   define LibraryCplusplusOptions SharedLibraryCplusplusOptions
  151. #  else
  152. #   define LibraryCplusplusOptions DefaultCplusplusOptions
  153. #  endif
  154. # endif
  155.  
  156. #ifdef CrossCompileDir
  157.           CXX = CrossLibraryCplusplusCmd
  158. #else
  159.           CXX = LibraryCplusplusCmd
  160. #endif
  161.    CXXOPTIONS = LibraryCplusplusOptions
  162.   STD_DEFINES = LibraryDefines $(PROJECT_DEFINES)
  163. CXXDEBUGFLAGS = LibraryCplusplusDebugFlags
  164. CXXLIBDEBUGFLAGS = LibraryDebugOpt
  165.      CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXLIBDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
  166. # if defined(LargePICTable) && LargePICTable
  167. #  ifdef LargePositionIndependentCplusplusFlags
  168.   CXXPICFLAGS = LargePositionIndependentCplusplusFlags
  169. #  elif defined(LargePositionIndependentCFlags)
  170.   CXXPICFLAGS = LargePositionIndependentCFlags
  171. #  endif
  172. # endif
  173. #endif
  174.  
  175. #ifdef LibraryMTDefines
  176. LIB_MT_DEFINES = LibraryMTDefines
  177. #endif
  178.  
  179. #if defined(IHaveSubdirs) && HasSymLinks && !defined(NoLibSubdirs)
  180. #define _LibMkdir LibMkdirLinkSubdirs
  181. #else
  182. #define _LibMkdir LibMkdir
  183. #endif
  184.  
  185. #if DoDebugLib
  186. # define _DebuggedLibMkdir() _LibMkdir(debugger)
  187. # define _DebuggedObjCompile(options) DebuggedLibObjCompile(options)
  188. # define _DebuggedObjCplusplusCompile(options) DebuggedLibObjCplusplusCompile(options)
  189. # define _DebuggedCleanDir() LibCleanDir(debugger)
  190. #else
  191. # define _DebuggedLibMkdir() $(_NULLCMD_)
  192. # define _DebuggedObjCompile(options) $(_NULLCMD_)
  193. # define _DebuggedObjCplusplusCompile(options) $(_NULLCMD_)
  194. # define _DebuggedCleanDir() $(_NULLCMD_)
  195. #endif
  196.  
  197. #if DoProfileLib
  198. # define _ProfiledLibMkdir() _LibMkdir(profiled)
  199. # define _ProfiledObjCompile(options) ProfiledLibObjCompile(options)
  200. # define _ProfiledObjCplusplusCompile(options) ProfiledLibObjCplusplusCompile(options)
  201. # define _ProfiledCleanDir() LibCleanDir(profiled)
  202. #else
  203. # define _ProfiledLibMkdir() $(_NULLCMD_)
  204. # define _ProfiledObjCompile(options) $(_NULLCMD_)
  205. # define _ProfiledObjCplusplusCompile(options) $(_NULLCMD_)
  206. # define _ProfiledCleanDir() $(_NULLCMD_)
  207. #endif
  208.  
  209. #if !DoNormalLib
  210. # define _NormalLibMkdir() $(_NULLCMD_)
  211. # define _NormalObjCompile(options) $(_NULLCMD_)
  212. # define _NormalObjCplusplusCompile(options) $(_NULLCMD_)
  213. # define _NormalCleanDir() $(_NULLCMD_)
  214. #else
  215. # if (DoSharedLib || DoPicLib) && SeparateSharedCompile
  216. #  define _NormalLibMkdir() _LibMkdir(unshared)
  217. #  define _NormalObjCompile(options) UnsharedLibObjCompile(options)
  218. #  define _NormalObjCplusplusCompile(options) UnsharedLibObjCplusplusCompile(options)
  219. #  define _NormalCleanDir() LibCleanDir(unshared)
  220. # else
  221. #  define _NormalLibMkdir() $(_NULLCMD_)
  222. #  if (!DoSharedLib && !DoPicLib) &&  defined(IncludeSharedObjectInNormalLib)
  223. #   define _NormalObjCompile(options) NormalRelocLibObjCompile(options)
  224. #  else
  225. #   define _NormalObjCompile(options) NormalLibObjCompile(options)
  226. #  endif
  227. #  define _NormalObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options)
  228. #  define _NormalCleanDir() $(_NULLCMD_)
  229. # endif
  230. #endif
  231.  
  232. #if !DoSharedLib && !DoPicLib || (DoNormalLib && !SeparateSharedCompile)
  233. # define _SharedObjCompile(options) $(_NULLCMD_)
  234. # define _SharedObjCplusplusCompile(options) $(_NULLCMD_)
  235. #else
  236. # if SeparateSharedCompile
  237. #  define _SharedObjCompile(options) NormalSharedLibObjCompile(options)
  238. #  define _SharedObjCplusplusCompile(options) NormalSharedLibObjCplusplusCompile(options)
  239. #else
  240. # define _SharedObjCompile(options) NormalLibObjCompile(options)
  241. # define _SharedObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options)
  242. #endif
  243. #endif
  244.  
  245. #ifndef LibInstallBuild
  246. #define LibInstallBuild NO
  247. #endif
  248.  
  249. #if DoExtraLib && defined(ExtraLibRules)
  250. # define _ExtraLibMkdir() ExtraLibMkdir()
  251. # define _ExtraObjCompile(options) ExtraObjCompile(options)
  252. # define _ExtraObjCplusplusCompile(options) ExtraObjCplusplusCompile(options)
  253. # define _ExtraCleanDir() ExtraCleanDir()
  254. #else
  255. # define _ExtraLibMkdir() $(_NULLCMD_)
  256. # define _ExtraObjCompile(options) $(_NULLCMD_)
  257. # define _ExtraObjCplusplusCompile(options) $(_NULLCMD_)
  258. # define _ExtraCleanDir() $(_NULLCMD_)
  259. #endif
  260.  
  261. #ifndef CplusplusSource
  262. # define SRCsuf c
  263. # define Isuf i
  264. #else
  265. # define SRCsuf CCsuf
  266. # define Isuf ii
  267. # ifdef SunArchitecture
  268. .SUFFIXES: Concat(.,CCsuf)
  269. # endif
  270. #endif
  271.  
  272. #define _CompileObj(target, options)                    @@\
  273. target                                    @@\
  274.     _DebuggedObjCompile(options)                    @@\
  275.     _ProfiledObjCompile(options)                    @@\
  276.     _NormalObjCompile(options)                    @@\
  277.     _ExtraObjCompile(options)                    @@\
  278.     _SharedObjCompile(options)
  279.  
  280. #ifndef SeparateSharedCompile
  281. # define _CompileObjSeparateOpts(target,staticopts,sharedopts) \
  282.     _CompileObj(target,sharedopts)
  283. #else
  284. # define _CompileObjSeparateOpts(target,staticopts,sharedopts)        @@\
  285. target                                    @@\
  286.     _DebuggedObjCompile(staticopts)                    @@\
  287.     _ProfiledObjCompile(staticopts)                    @@\
  288.     _NormalObjCompile(staticopts)                    @@\
  289.     _ExtraObjCompile(staticopts)                    @@\
  290.     _SharedObjCompile(sharedopts)
  291. #endif
  292.  
  293. #ifdef CplusplusSource
  294. # define _CompileObjCplusplus(target, options)                @@\
  295. target                                    @@\
  296.     _DebuggedObjCplusplusCompile(options)                @@\
  297.     _ProfiledObjCplusplusCompile(options)                @@\
  298.     _NormalObjCplusplusCompile(options)                @@\
  299.     _ExtraObjCplusplusCompile(options)                @@\
  300.     _SharedObjCplusplusCompile(options)
  301. #else
  302. # define _CompileObjCplusplus(target, options)
  303. #endif
  304.  
  305. #ifndef LibraryObjectRule
  306. # define LibraryObjectRule()                        @@\
  307. all::                                    @@\
  308.     _DebuggedLibMkdir()                        @@\
  309.     _ProfiledLibMkdir()                        @@\
  310.     _NormalLibMkdir()                        @@\
  311.     _ExtraLibMkdir()                        @@\
  312.                                     @@\
  313. includes::                                @@\
  314.     _DebuggedLibMkdir()                        @@\
  315.     _ProfiledLibMkdir()                        @@\
  316.     _NormalLibMkdir()                        @@\
  317.     _ExtraLibMkdir()                        @@\
  318.                                     @@\
  319. _CompileObj(.c.Osuf:,$(_NOOP_))                        @@\
  320. _CompileObjCplusplus(.SRCsuf.Osuf:,$(_NOOP_))                @@\
  321.                                     @@\
  322. clean::                                    @@\
  323.     _DebuggedCleanDir()                        @@\
  324.     _ProfiledCleanDir()                        @@\
  325.     _NormalCleanDir()                        @@\
  326.     _ExtraCleanDir()                        @@\
  327.  
  328. #endif /* LibraryObjectRule */
  329.  
  330. #ifndef SpecialLibObjectRule
  331. # define SpecialLibObjectRule(objs,depends,options)            @@\
  332. _CompileObj(objs: depends,options)
  333. #endif /* SpecialLibObjectRule */
  334.  
  335. #ifndef SpecialCLibObjectRule
  336. # define SpecialCLibObjectRule(basename,depends,options)        @@\
  337. _CompileObj(basename.Osuf: basename.SRCsuf depends,options)        @@\
  338.                                     @@\
  339. basename.Isuf: basename.SRCsuf depends                    @@\
  340.     CPPOnlyCompile(basename.SRCsuf,options)                @@\
  341.                                     @@\
  342. CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options)
  343. #endif /* SpecialCLibObjectRule */
  344.  
  345. #ifndef SpecialCLibObjectRuleSeparateOpts
  346. # define SpecialCLibObjectRuleSeparateOpts(basename,depends,staticopts,shopts) @@\
  347. _CompileObjSeparateOpts(basename.Osuf: basename.SRCsuf depends,staticopts,shopts)    @@\
  348.                                     @@\
  349. basename.Isuf: basename.SRCsuf depends                    @@\
  350.     CPPOnlyCompile(basename.SRCsuf,sharedopts)            @@\
  351.                                     @@\
  352. CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options)
  353. #endif /* SpecialCLibObjectRuleSepareateOpts */
  354.  
  355. #ifndef SpecialCplusplusLibObjectRule
  356. # define SpecialCplusplusLibObjectRule(basename,depends,options)    @@\
  357. _CompileObjCplusplus(basename.Osuf: basename.SRCsuf depends,options)    @@\
  358.                                     @@\
  359. CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options)
  360. #endif /* SpecialCplusplusLibObjectRule */
  361.  
  362. /*
  363.  * ToolkitMakeStrings generates a string-table, i.e., a C source
  364.  * file and the matching header(s), e.g., Xt's StringDefs.c, StringDefs.h,
  365.  * and Shell.h files; or Motif's XmStrDefs.c and XmStrDefs.h files.
  366.  *
  367.  * The 'files' argument is the list of files that will be produced by
  368.  * this rule, e.g., for Xt they would be "Shell.h StringDefs.c StringDefs.h"
  369.  * and for Motif they would be "XmStrDefs.c XmStrDefs.h".
  370.  *
  371.  * The 'source' argument is the string-list file to be parsed, e.g., in
  372.  * Xt that would be "util/string.list".  For Motif 2.0 it would be
  373.  * "../../tools/makestr/xmstring.list", and for Motif-CDE1 it would be
  374.  * "util/xmstring.list".
  375.  *
  376.  * The 'options' argument is passed by the library's Imakefile, see the
  377.  * Xt Imakefile for an example.  Typically this would be nothing, -intelabi,
  378.  * or -sparcabi; there are other choices, but these are typical.
  379.  *
  380.  * The 'depends' argument names additional files the target files
  381.  * depend on.  It should name the #ctmpl and #htmpl files from the
  382.  * 'source' file.
  383.  *
  384.  * The 'dest' argument is the C source output file.  For Xt this should
  385.  * be "StringDefs.c", and for all versions of Motif it would be "XmStrDefs.c"
  386.  *
  387.  * Headers are generated and named according to data in the 'source'
  388.  * file.
  389.  */
  390. /*
  391.  * The NoCmpScript
  392.  * prevents clearmake from trying to remake makestrs if it exists.
  393.  * Including both $(MAKESTRS) and $(MAKESTRS).o as primary targets
  394.  * prevents clearmake from trying to recompile makestrs from here.
  395.  * We have includes, not files, depend on makestrs to try to get
  396.  * clearmake to wink in the files.  Bug in clearmake 2.0.2?
  397.  */
  398.  
  399. #ifndef MakeStringsDependency
  400. # ifndef UseInstalled
  401. #  define MakeStringsDependency                        @@\
  402. MAKESTRS = $(CONFIGSRC)/util/makestrs                    @@\
  403. NoCmpScript(HostProgramTargetName($(MAKESTRS)) $(MAKESTRS).Osuf)    @@\
  404.                                     @@\
  405. HostProgramTargetName($(MAKESTRS)) $(MAKESTRS).Osuf:            @@\
  406.     cd $(CONFIGSRC)/util && $(MAKE) HostProgramTargetName(makestrs)    @@\
  407.                                     @@\
  408. includes:: HostProgramTargetName($(MAKESTRS))
  409. # else
  410. #  define MakeStringsDependency  /**/
  411. # endif
  412. #endif
  413.  
  414. #ifndef ToolkitMakeStrings
  415. # if defined(LibTookitMakeStringsDependency) && LibTookitMakeStringsDependency
  416. #  define ToolkitMakeStrings(files,source,options,depends,dest)        @@\
  417. files: source depends                            @@\
  418.     RemoveFiles(files)                        @@\
  419.     RunProgram(MAKESTRS,options < source > dest)            @@\
  420.                                     @@\
  421. AllTarget(files)                            @@\
  422.                                     @@\
  423. includes:: files                            @@\
  424.                                     @@\
  425. depend:: files                                @@\
  426.                                     @@\
  427. clean::                                    @@\
  428.     RemoveFiles(files)
  429. # else
  430. #  define ToolkitMakeStrings(files,source,options,depends,dest)        @@\
  431. MakeStringsDependency                            @@\
  432.                                     @@\
  433. files: source depends                            @@\
  434.     RemoveFiles(files)                        @@\
  435.     RunProgram(MAKESTRS,options < source > dest)            @@\
  436.                                     @@\
  437. AllTarget(files)                            @@\
  438.                                     @@\
  439. includes:: files                            @@\
  440.                                     @@\
  441. depend:: files                                @@\
  442.                                     @@\
  443. clean::                                    @@\
  444.     RemoveFiles(files)
  445. # endif
  446. #endif /* ToolkitMakeStrings */
  447.  
  448. #ifdef LibName
  449.  
  450. LIBNAME = LibName
  451.  
  452. # if defined(LibTookitMakeStringsDependency) && LibTookitMakeStringsDependency
  453. /*
  454.  * Do ToolkitMakeStrings() before BuildIncludes so makestrs is still
  455.  * built first, even if the generated header will be installed.
  456.  */
  457. MakeStringsDependency
  458. # endif
  459.  
  460. LibraryObjectRule()
  461.  
  462. # undef _LinkBuildLibrary
  463. # if !defined(LibInstall) || LibInstall || LibInstallBuild
  464. #  define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
  465. # else
  466. #  define _LinkBuildLibrary(lib) $(_NULLCMD_)
  467. # endif
  468.  
  469. # if defined(LibBuild) && !LibBuild
  470. #  define LibCreate NO
  471. # endif
  472.  
  473. # if !defined(LibCreate) || LibCreate
  474. #  if DoSharedLib
  475. #   if HugeLibrary && defined(SharedLibraryTarget3)
  476. SharedLibraryTarget3($(LIBNAME),$(SoRev),$(OBJS1),$(OBJS2),$(OBJS3) $(EXTRASHAREDOBJS),.,.)
  477. #   else
  478. #    if defined(SharedLibtoolRev) && defined(SharedLibtoolLibraryTarget)
  479. SharedLibtoolLibraryTarget($(LIBNAME),SharedLibtoolRev,$(OBJS) $(EXTRASHAREDOBJS),.,.)
  480. #    else
  481. SharedLibraryTarget($(LIBNAME),$(SoRev),$(OBJS) $(EXTRASHAREDOBJS),.,.)
  482. #    endif
  483. #   endif
  484. #   if !defined(LibInstall) || LibInstall
  485. #    if defined(SharedLibtoolRev) && defined(InstallSharedLibtoolLibrary)
  486. InstallSharedLibtoolLibrary($(LIBNAME),SharedLibtoolRev,$(SHLIBDIR))
  487. #    else
  488. InstallSharedLibrary($(LIBNAME),$(SoRev),$(SHLIBDIR))
  489. #    endif
  490. #   endif
  491. #   if HasSharedData
  492. SharedLibraryDataTarget($(LIBNAME),$(SoRev),$(UNSHAREDOBJS))
  493. #    if !defined(LibInstall) || LibInstall
  494. InstallSharedLibraryData($(LIBNAME),$(SoRev),$(SHLIBDIR))
  495. #    endif
  496. #   endif
  497. #  endif
  498. #  if DoNormalLib
  499. #   if HugeLibrary
  500. #    if DoSharedLib && SeparateSharedCompile
  501. UnsharedLibraryTarget3($(LIBNAME),$(OBJS1),$(OBJS2),$(OBJS3) $(EXTRAUNSHAREDOBJS),unshared,..)
  502. #    else
  503. NormalLibraryTarget3($(LIBNAME),$(OBJS1),$(OBJS2),$(OBJS3) $(EXTRAUNSHAREDOBJS))
  504. #    endif
  505. #   else
  506. #    if DoSharedLib && SeparateSharedCompile
  507. UnsharedLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS),unshared,..)
  508. #    else
  509. NormalLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS))
  510. #    endif
  511. #   endif
  512. #   if !defined(LibInstall) || LibInstall
  513. InstallLibrary($(LIBNAME),$(USRLIBDIR))
  514. #   endif
  515. #  endif
  516. #  if DoProfileLib
  517. ProfiledLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS))
  518. #   if !defined(LibInstall) || LibInstall
  519. InstallLibrary($(LIBNAME)_p,$(USRLIBDIR))
  520. #   endif
  521. #  endif
  522. #  if DoDebugLib
  523. DebuggedLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS))
  524. #   if !defined(LibInstall) || LibInstall
  525. InstallLibrary($(LIBNAME)_d,$(USRLIBDIR))
  526. #   endif
  527. #  endif
  528. #  if DoPicLib
  529. PicLibraryTarget($(LIBNAME),$(OBJS))
  530. #   if !defined(LibInstall) || LibInstall
  531. InstallLibrary($(LIBNAME)_pic,$(USRLIBDIR))
  532. #   endif
  533. #  endif
  534. #  if DoExtraLib && defined(ExtraLibRules)
  535. ExtraLibraryTarget($(LIBNAME),$(SoRev),$(OBJS) $(EXTRAUNSHAREDOBJS))
  536. #   if !defined(LibInstall) || LibInstall
  537. ExtraInstallLibrary($(LIBNAME),$(SoRev))
  538. #   endif
  539. #  endif
  540.  
  541. LintLibraryTarget($(LIBNAME),$(SRCS))
  542. #  if !defined(LibInstall) || LibInstall
  543. InstallLintLibrary($(LIBNAME),$(LINTLIBDIR))
  544. #  endif
  545. # else /* not LibCreate */
  546. #  if LibBuild
  547. #   if HugeLibrary
  548. AllTarget($(OBJS1))
  549. AllTarget($(OBJS2))
  550. AllTarget($(OBJS3))
  551. #   else
  552. AllTarget($(OBJS))
  553. #   endif
  554. #   if DoSharedLib
  555. AllTarget($(EXTRASHAREDOBJS))
  556. #   endif
  557. #   if DoNormalLib
  558. AllTarget($(EXTRAUNSHAREDOBJS))
  559. #   endif
  560. #  endif /* LibBuild */
  561. # endif /* LibCreate */
  562. # ifdef IncSubdir
  563. #  ifdef IncSubSubdir
  564. #   if !defined(LibHeaders) || LibHeaders
  565. BuildIncludes($(HEADERS),IncSubdir/IncSubSubdir,../..)
  566. #    if BuildLibraries
  567. InstallMultipleFlags($(HEADERS),$(INCDIR)/IncSubdir/IncSubSubdir,$(INSTINCFLAGS))
  568. #     endif
  569. #   endif
  570. #  else
  571. #   if !defined(LibHeaders) || LibHeaders
  572. BuildIncludes($(HEADERS),IncSubdir,..)
  573. #    if BuildLibraries
  574. InstallMultipleFlags($(HEADERS),$(INCDIR)/IncSubdir,$(INSTINCFLAGS))
  575. #    endif
  576. #   endif
  577. #  endif
  578. # else
  579. #  ifndef CplusplusSource
  580. #   if !defined(LibHeaders) || LibHeaders
  581. BuildIncludesTop($(HEADERS))
  582. #    if BuildLibraries
  583. InstallMultipleFlags($(HEADERS),$(INCDIR),$(INSTINCFLAGS))
  584. #    endif
  585. #   endif
  586. #  endif
  587. # endif
  588.  
  589. NormalLintTarget($(SRCS))
  590. #endif /* defined(LibName) */
  591.  
  592. #ifdef NoSoSymlink
  593. SOSYMLINK = false
  594. #else
  595. SOSYMLINK = true
  596. #endif
  597.